import request from "@/utils/request";

export function addMessage(data) {
  return request({
    url: "/api/message/add",
    method: "post",
    data,
  });
}

export function updateMessage(data) {
  return request({
    url: "/api/message/update",
    method: "post",
    data,
  });
}

export function reqMessageInfo(pageNo,pageSize){
  return request({
    url:`/api/message/info?pageNo=${pageNo}&pageSize=${pageSize}`,
    method:"get"
  })
}

export function delMessage(data) {
  return request({
    url: `/api/message/remove`,
    method: "post",
    data
  });
}

export function delBatchMessage(data) {
  return request({
    url: "/api/message/delBatch",
    method: "post",
    data,
  });
}

export function searchMessage(title){
  return request({
    url: `/api/message/search?title=${title}`,
    method: "get",
  });
}